//
//  Status.swift
//  Weibo
//
//  Created by 唐润欣 on 16/6/19.
//  Copyright © 2016年 唐润欣. All rights reserved.
//

import UIKit

class Status: NSObject {

    //创建时间
    var created_at: String?
    
    //微博id
    var id: Int64 = 0
    
    //微博内容
    var text: String?
    
    //微博来源
    var source: String?
    
    //发微博的用户
    var user: User?
    
    //图片模型数据
    var pic_urls: [PictureModel]?
    
    //转发微博
    var retweeted_status: Status?
    
    //在swift中，类名的正确写法： 命名空间.类名
    //如果接口数据中，包含数组，需要实现该法
    class func modelContainerPropertyGenericClass() ->[String: AnyObject] {
        
        return ["pic_urls": "Weibo.PictureModel"]
    }
    
    override var description: String {
        
        let keys = ["created_at", "id", "text", "source", "user", "pic_urls", "retweeted_status"]
        
        return dictionaryWithValuesForKeys(keys).description
    }
}
